#line 1 "F:/Electronic/easypic6/04-COG Potentiometer/Sam/EasyPIC LCD Potentiometer.c"
#line 21 "F:/Electronic/easypic6/04-COG Potentiometer/Sam/EasyPIC LCD Potentiometer.c"
const unsigned long waiting = 200;
char *text = "Hello World :-)";
long potentiometer_value;


 sbit SPExpanderCS at RA2_bit;
 sbit SPExpanderRST at RA3_bit;
 sbit SPExpanderCS_Direction at TRISA2_bit;
 sbit SPExpanderRST_Direction at TRISA3_bit;


void init() {
 ANSEL = 0x04;
 ANSELH = 0;
 C1ON_bit = 0;
 C2ON_bit = 0;


 SPI1_Init();
 SPI_Lcd_Config(0);
 SPI_Lcd_Cmd(_LCD_CLEAR);
 SPI_Lcd_Cmd(_LCD_CURSOR_OFF);
}

void main() {
 init();
 while(1) {
 potentiometer_value = ADC_Read(2);
 LongToStr(potentiometer_value,text);
 SPI_Lcd_Out(1,1, text);

 }
}
